package com.cargohu.aishouyu.member.dto;

import cn.hutool.core.util.IdUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 添加聊天记录参数
 *
 * @author aaron.wang
 * @since 2023-11-27
 */
@Data
@Schema(description = "添加聊天记录参数")
public class ChatHistoryAddDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "消息ID")
    private String messageId = IdUtil.simpleUUID();

    @Schema(description = "会员ID")
    @NotNull(message = "会员ID不能为空")
    private Long memberId;

    @Schema(description = "消息内容")
    @NotBlank(message = "消息内容不能为空")
    @Length(max = 65535, message = "消息内容长度超过限制")
    private String content;

    @Schema(description = "时间")
    private Date time;

    @Schema(description = "消息类型：1常用语，2正常人语音，3键盘输入，4手语识别")
    private Byte type;

    @Schema(description = "删除标记，1未删除，0已删除")
    @Length(max = 1, message = "删除标记，1未删除，0已删除长度超过限制")
    private String delFlag;

}


